package com.itheima.demo4;

public interface Eatable {
    String eat(String food);
}
 class Test1 {
     public static void main(String[] args) {
         useEatable(new Eatable() {
             @Override
             public String eat(String food) {
                 return (food+"吃下去就变成奥利给了");
             }
         });
         useEatable(food -> food+"是铁,一顿不吃饿的慌");
     }

     public static void useEatable(Eatable eatable){
         String s = eatable.eat("饭");
         System.out.println(s);
     }
 }